import request from '@/utils/request'

export function getList(data) {
  return request.post({
    url: '/api/pds/pdsPlanning/list',
    data
  })
}
export function removePlan(data) {
  return request.post({
    url: '/api/pds/pdsPlanning/delete',
    data
  })
}
export function getDetail(data) {
  return request.post({
    url: '/api/pds/pdsPlanning/detail',
    data
  })
}
export function getSubDetail(data) {
  return request.post({
    url: '/api/pds/pdsPlanning/sub-detail',
    data
  })
}
export function save(data) {
  return request.postJson({
    url: '/api/pds/pdsPlanning/save-planning',
    data
  })
}
/* 导出 */
export function exportPdf(id) {
  // return request.get({
  //   url: '/api/pds/pdsPlanning/export-pdf',
  //   data
  // })
  let baseUrl = process.env.NODE_ENV === 'production' ? process.env.BASE_API : '',
    url = '/api/pds/pdsPlanning/export-pdf?id=';
  return baseUrl + url + id;
}
